package com.lineage.server.serverpackets;

public class S_Party extends ServerBasePacket {
  private byte[] _byte;
  
  public S_Party(String htmlid, int objid) {
    this._byte = null;
    buildPacket(htmlid, objid, "", "", 0);
  }
  
  public S_Party(String htmlid, int objid, String partyname, String partymembers) {
    this._byte = null;
    buildPacket(htmlid, objid, partyname, partymembers, 1);
  }
  
  private void buildPacket(String htmlid, int objid, String partyname, String partymembers, int type) {
    writeC(39);
    writeD(objid);
    writeS(htmlid);
    writeH(type);
    writeH(2);
    writeS(partyname);
    writeS(partymembers);
  }
  
  public byte[] getContent() {
    if (this._byte == null)
      this._byte = getBytes(); 
    return this._byte;
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
